vector object

The vector object is used to store a set of coordinates for a 2d or 3d environment.

vector(float x, float y, float z)

Parameters:
x
An optional float representing the x value of the vector.
y
A float representing the y value of the vector. This parameter must be filled in if an x value is specified.
z
An optional float representing the z value of the vector.

Remarks:
The parameters may simply be left out if desired. This will simply give values of 0 to all the coordinates.

This object contains the following overloaded operators:

Example:
// Create a vector object and display its values.

void main()
{
vector game_world(5, 2, 3);
alert("Information", "Current coordinates are "+game_world.x+", "+game_world.y+", "+game_world.z+".");
}